
function sum(...args) {
    return args.reduce((p, c) => p + c, 0);
}

// eslint-disable-next-line
console.log(sum(1, 2, 3, 4));


console.log(mul)


/**
 * 
 * 通过js代码  让某个文件单独打包成一个chunk 并使打包后的其名称为test
 */

import(/* webpackChunkName: "test" */"./js/test")
    .then(({ mul }) => {
        console.log(mul(2, 5))
    })
    .catch(() => {
        console.log("文件加载失败")
    })